import type { FormRules } from 'naive-ui'

export const createRule = (): FormRules => {
  return {
    parentId: [
      {
        required: true,
        message: '上级id不能为空',
        trigger: 'submit',
      },
    ],
    name: [
      {
        required: true,
        message: '部门名称不能为空',
        trigger: 'submit',
      },
    ],
    sortOrder: [
      {
        type: 'number',
        required: true,
        message: '部门排序不能为空',
        trigger: 'submit',
      },
    ],
  }
}
